﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LS_YCJSModeWebForm.aspx.cs" Inherits="Anke.SHManage.Web.Reports.LS_YCJSModeWebForm" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml"> 
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>异常结束流水表</title>
    <script src="../Content/EasyUI/jquery.js"></script>
    <script src="../Content/EasyUI/jquery.easyui.js"></script>
    <script src="../Content/EasyUI/locale/easyui-lang-zh_CN.js"></script>
    <link href="../Content/EasyUI/themes/icon.css" rel="stylesheet" />
    <link href="../Content/EasyUI/themes/default/easyui.css" rel="stylesheet" />
    <script src="../Scripts/jquery.AnkeExtend.js"></script>
    <script type="text/javascript">
        //页面加载
        $(document).ready(function () {
            DisableBackspace();
            reload();
        });
        function fillCombobox() {
            //取所属分中心的下拉框的值
            $("#Center").combobox({
                url: "../BB/AllDictionary/GetCenterName",
                valueField: 'ID',
                textField: 'Name',
                editable: false,
                multiple: true,
                prompt: '--请选择--',
                onSelect: function (rec) {
                    var ids = $('#Center').combobox('getValues');
                    //根据分中心取分站
                    $("#Station").combobox({
                        url: "../BB/AllDictionary/GetSationName?centerID=" + ids,
                        method: 'POST',
                        valueField: 'ID',
                        textField: 'Name',
                        multiple: true,
                        editable: false,
                        onSelect: function () {
                            $('#Station').combobox('getValues')
                        },
                        onUnselect: function () {
                            $('#Station').combobox('getValues')
                        }
                    });
                    $("#Station").combobox('clear');
                },
                onUnselect: function (rec) {
                    var ids = $('#Center').combobox('getValues');
                    //根据分中心取分站
                    $("#Station").combobox({
                        url: "../BB/AllDictionary/GetSationName?centerID=" + ids,
                        method: 'POST',
                        valueField: 'ID',
                        textField: 'Name',
                        multiple: true,
                        editable: false
                    });
                    $("#Station").combobox('clear');
                },
            });

            var centers = $('#Center').combobox('getValues');
            $("#Station").combobox({
                url: "../BB/AllDictionary/GetSationName?centerID=" + centers,
                method: 'POST',
                valueField: 'ID',
                textField: 'Name',
                multiple: true,
                editable: false,
                onSelect: function () {
                    $('#Station').combobox('getValues')
                },
                onUnselect: function () {
                    $('#Station').combobox('getValues')
                }
            });
            //异常结束类型
            $('#EmptyType').combobox({
                valueField: 'ID',
                textField: 'Name',
                method: 'get',
                editable: false,
                panelHeight: 'auto',
                data: [
                {
                    ID: '-1',
                    Name: '--请选择--',
                },
                {
                    ID: '1',
                    Name: '途中召回'
                },
                {
                    ID: '2',
                    Name: '车到人走'
                },
                {
                    ID: '3',
                    Name: '车到不要（未诊治）'
                },
                {
                    ID: '4',
                    Name: '突发事件'
                },
                {
                    ID: '5',
                    Name: '其他'
                },
                {
                    ID: '6',
                    Name: '车到未送'
                }
                ],
                onSelect: function () {
                    $('#HiddenForEmptyType').val($('#EmptyType').combobox('getValue'));
                },
                onLoadSuccess: function () {
                    var dataz = $('#EmptyType').combobox('getData');
                    $("#EmptyType").combobox('select', dataz[0].ID);
                }

            });
            //更改时间
            $('#Time').combobox({
                valueField: 'ID',
                textField: 'Name',
                method: 'post',
                editable: false,
                panelHeight: 'auto',
                data: [
                {
                    ID: '-1',
                    Name: '--请选择--',
                },
                {
                    ID: '1',
                    Name: '出车时间'
                },
                {
                    ID: '2',
                    Name: '到达现场时间'
                },
                {
                    ID: '3',
                    Name: '离开时间'
                },
                {
                    ID: '4',
                    Name: '到院时间'
                }
                ],
                onSelect: function () {
                    $('#HiddenForTime').val($('#Time').combobox('getValue'));
                },
                onLoadSuccess: function () {
                    var dataz = $('#Time').combobox('getData');
                    $("#Time").combobox('select', dataz[0].ID);
                }
            });
            //更改原因
            $('#Reason').combobox({
                valueField: 'ID',
                textField: 'Name',
                method: 'post',
                editable: false,
                panelHeight: 'auto',
                data: [
                {
                    ID: '-1',
                    Name: '--请选择--',
                },
                {
                    ID: '1',
                    Name: '车到未送'
                },
                {
                    ID: '2',
                    Name: '设备故障'
                },
                {
                    ID: '3',
                    Name: '网络问题'
                },
                {
                    ID: '4',
                    Name: 'GPS误按'
                },
                {
                    ID: '5',
                    Name: '一车多人'
                },
                {
                    ID: '6',
                    Name: '其他'
                }
                ],
                onSelect: function () {
                    $('#HiddenForReason').val($('#Reason').combobox('getValue'));
                },
                onLoadSuccess: function () {
                    var dataz = $('#Reason').combobox('getData');
                    $("#Reason").combobox('select', dataz[0].ID);
                }
            })
        };
        // 实现UpdatePanel中可以再添加easyUI的样式
        function reload() {
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
        }
        function EndRequestHandler() {
            fillCombobox();
            $('#StartDate').datetimebox();
            $('#EndDate').datetimebox();
            $('#txtDoctor').textbox();
            $('#txtNurse').textbox();
            $('#txtDriver').textbox();
            $('#txtStretcher').textbox();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <table>
                    <tr>
                        <td>查询时间：</td>
                        <td>
                            <asp:TextBox ID="StartDate" class="easyui-datetimebox" Style="width: 150px" runat="server" editable="false"></asp:TextBox>
                        </td>
                        <td style="text-align: center">至</td>
                        <td>
                            <asp:TextBox ID="EndDate" class="easyui-datetimebox" Style="width: 150px" runat="server" editable="false"></asp:TextBox>
                        </td>
                        <td style="text-align: right">分中心：</td>
                        <td>
                            <asp:TextBox ID="Center" class="easyui-combobox" Style="width: 150px" runat="server"></asp:TextBox>
                        </td>
                        <td style="text-align: right">分站：</td>
                        <td>
                            <asp:TextBox ID="Station" class="easyui-combobox" Style="width: 150px" runat="server"></asp:TextBox>
                        </td>
                        <td style="text-align: right">异常结束类型：</td>
                        <td>
                            <asp:HiddenField ID="HiddenForEmptyType" runat="server" />
                            <select id="EmptyType" class="easyui-combobox" style="width: 150px" data-options="editable:false">
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td style="text-align: right">医生：</td>
                        <td>
                            <asp:TextBox ID="txtDoctor" class="easyui-textbox" Style="width: 150px" runat="server"></asp:TextBox>
                        </td>
                        <td style="text-align: right">护士：</td>
                        <td>
                            <asp:TextBox ID="txtNurse" class="easyui-textbox" Style="width: 150px" runat="server"></asp:TextBox>
                        </td>
                        <td style="text-align: right">司机：</td>
                        <td>
                            <asp:TextBox ID="txtDriver" class="easyui-textbox" Style="width: 150px" runat="server"></asp:TextBox>
                        </td>
                        <td style="text-align: right">担架员：</td>
                        <td>
                            <asp:TextBox ID="txtStretcher" class="easyui-textbox" Style="width: 150px" runat="server"></asp:TextBox>
                        </td>     
                      <%--  <td style="text-align: right">时间：</td>
                        <td>
                            <asp:HiddenField ID="HiddenForTime" runat="server" />
                            <select id="Time" class="easyui-combobox" style="width: 150px" data-options="editable:false">
                            </select>
                        </td>
                        <td style="text-align: right">更改原因：</td>
                        <td>
                            <asp:HiddenField ID="HiddenForReason" runat="server" />
                            <select id="Reason" class="easyui-combobox" style="width: 150px" data-options="editable:false">
                            </select>
                        </td>--%>
                        <td></td>
                        <td></td>
                        <td>
                            <asp:Button ID="Button1" runat="server" Text="查询" OnClick="btnSearch_Click" />
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
        <div style="background-color: #fafafa; border-left: 1px solid scrollbar; overflow: hidden; height: 100%;">
            <rsweb:ReportViewer ID="ReportViewer1" runat="server" Width="100%" Height="100%"   SizeToReportContent="True">
            </rsweb:ReportViewer>
        </div>
    </form>
</body>
</html>

